package t;

import com.alibaba.fastjson.JSONObject;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class ListMapTest {

    public static void main(String[] args) {
        List<ABean> list = new ArrayList<>();
        list.add(new ABean("A"));
        list.add(new ABean("b"));
        list.add(new ABean("c"));

//        Map<String, ABean> collect = list.stream().collect(Collectors.toMap("value", ABean::getName, (k1, k2) -> k1));
//        System.out.println(JSONObject.toJSONString(collect));
    }

}
